package top.wfzzq.tds;

public class Node {
	private int data;// 节点数据
	private Node next;// 下一节

	// 如果类没有构造函数，系统会给一个默认无参的空构造
	// 但是一旦给了构造函数，系统去取消默认无参胡空构造
	public Node() {

	}

	public Node(int data) {
		this.data = data;
	}

	public int getData() {
		return data;
	}

	public void setData(int data) {
		this.data = data;
	}

	public Node getNext() {
		return next;
	}

	public void setNext(Node next) {
		this.next = next;
	}

	@Override
	public String toString() {
		return "Node [data=" + data + ", next=" + next + "]";
	}
	
}
